# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=dnstracer
pkgver=1.10
pkgrel=3
pkgdesc='Determines where a given DNS server gets its information from, and follows the chain of DNS servers'
groups=('blackarch' 'blackarch-recon')
arch=('x86_64' 'aarch64')
url='https://www.mavetju.org/unix/dnstracer.php'
license=('custom:BSD')
depends=('glibc')
source=("https://www.mavetju.org/download/$pkgname-$pkgver.tar.bz2")
sha512sums=('8174f92c5c1b300c1011a24f0cf2f16dc2b52a082729e52d1033a047e20d132d6005b89618ecbbd25cbdc1c95cdc0748cf666bdc56b769b240d8885469bc6e05')

build() {
  cd $pkgname

  make PREFIX=/usr CC="gcc ${CFLAGS} ${LDFLAGS}"
}

package() {
  cd $pkgname

  install -dm 750 "$pkgdir"/usr/{bin,share/man/man8}

  make PREFIX="$pkgdir/usr" MANPREFIX="$pkgdir/usr/share/man/man8" install

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/dnstracer/LICENSE"
}

